package com.second.app.designpattern.state;

/**
 * @Author GYZ
 * @Date 2022/7/18 17:04
 * @Version 1.0
 */
public class ScoreContext {

    private AbstractState state;

    public ScoreContext(){
        state = new LowState(this);
    }

    public void setState(AbstractState state){
        this.state =state;
    }

    public AbstractState getState(){
        return state;
    }
    public void add(int score){
        state.addScore(score);
    }
}
